package com.jslx.controller;

import com.jslx.mapper.lcc.CodeDifficultMapper;
import com.jslx.pojo.lcc.CodeDifficult;
import com.jslx.pojo.lcc.CodeDifficultQuery;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ydw on 2017/7/22.
 */
@RestController
@RequestMapping("/")
public class TestController {

    @Autowired
    CodeDifficultMapper codeDifficultMapper;

    @RequestMapping("/")
    public CodeDifficult test1(){
        CodeDifficultQuery codeDifficultQuery = new CodeDifficultQuery();
        codeDifficultQuery.createCriteria().andNameEqualTo("2name");
        CodeDifficult codeDifficult = codeDifficultMapper.selectByExample(codeDifficultQuery).get(0);

        return codeDifficult;

    }

}
